﻿@using ClassifiedAds.IdentityServer.Models.UserModels
@model ChangePasswordModel

<form asp-controller="User" asp-action="ChangePassword" Method="post">
    <div class="row">

        <div class="col-12">
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a asp-controller="User" asp-action="Index">Users</a></li>
                    <li class="breadcrumb-item"><a asp-controller="User" asp-action="Profile" asp-route-id="@Model.Id">@Model.UserName</a></li>
                    <li class="breadcrumb-item active" aria-current="page">Change Password</li>
                </ol>
            </nav>
        </div>

        <div class="col-md-12">
            <h3>Change Password</h3>

            <div asp-validation-summary="All" class="text-danger"></div>

            <!--Hidden -->
            <input type="hidden" asp-for="Id" />

            <div class="card mt-3">
                <h5 class="card-header">Change Password</h5>
                <div class="card-body">

                    <!--Input - text -->
                    <div class="form-group row">
                        <label asp-for="UserName" class="col-sm-3 col-form-label">
                            @await Html.PartialAsync("_Label", "User Name")
                        </label>
                        <div class="col-sm-9">
                            <input type="hidden" class="form-control" asp-for="UserName">
                            <h4>@Model.UserName</h4>
                        </div>
                    </div>

                    <!--Input - text -->
                    <div class="form-group row">
                        <label asp-for="Password" class="col-sm-3 col-form-label">
                            @await Html.PartialAsync("_Label", "Password")
                        </label>
                        <div class="col-sm-9">
                            <input type="password" required class="form-control" asp-for="Password">
                            <span asp-validation-for="Password" class="text-danger"></span>
                        </div>
                    </div>

                    <!--Input - text -->
                    <div class="form-group row">
                        <label asp-for="ConfirmPassword" class="col-sm-3 col-form-label">
                            @await Html.PartialAsync("_Label", "Confirm Password")
                        </label>
                        <div class="col-sm-9">
                            <input type="password" required class="form-control" asp-for="ConfirmPassword">
                            <span asp-validation-for="ConfirmPassword" class="text-danger"></span>
                        </div>
                    </div>

                    <!--Button-->
                    <div class="form-group row">
                        <label class="col-sm-3 col-form-label">
                        </label>
                        <div class="col-sm-9">
                            <button type="submit" class="btn btn-danger">Change Password</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>